#include <vector>
#include <iostream>
#include<queue>
using namespace std;

class Solution {
	public:
		int dx[4] = { 0,0,-1,1 };
    	int dy[4] = { 1,-1,0,0 };
		bool num[1010][1010];
		int numEnclaves(vector<vector<int>> &grid) {
			memset(num, 0, sizeof(num));
			queue<pair<int,int>>q;
			int m=grid.size();
			int n=grid[0].size();
		for (int j = 0; j < n; j++) {
            if(grid[0][j]==1){
                
            }
        }
        for (int j = 0; j < m; j++) {
            if(grid[j][0]==1){
                    
            }
        }
        for (int j = 0; j <m; j++) {
            
            if(grid[j][n-1]==1){
                  
            }
        }
        for (int j = 0; j <n; j++) {
            
            if(grid[m-1][j]==1){
                  
            }
        }
	}
	void bfs(int x,int y,vector<vector<int>> &g,int m,int n){
		queue<pair<int,int>>q;
		q.push({x,y});
		while(q.size()){
			auto[a,b]=q.front();
			q.pop();
			for(int i=0;i<4;i++){
				int x1=a+dx[i];
				int y1=b+dy[i];
				if(x1>=0&&x1<m&&y1>=0&&y1<n&&g[x1][y1]==1&&num[x1][y1]==false){
					num[x1][y1]=true;
				}
			}
		}
	}
};

int main() {


	return 0;
}
